<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cc="clr-namespace:Flow.Launcher.Resources.Controls;assembly=Flow.Launcher"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
    xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure">
    <CornerRadius x:Key="ItemRadius">0</CornerRadius>
    <Thickness x:Key="ItemMargin">0</Thickness>
    <Thickness x:Key="ResultMargin">0</Thickness>
    <!--  Further font customizations are dynamically loaded in Theme.cs  -->

    <system:Double x:Key="ResultItemHeight">52</system:Double>

    <Style x:Key="BaseBulletStyle" TargetType="{x:Type Border}" />
    <Style
        x:Key="BulletStyle"
        BasedOn="{StaticResource BaseBulletStyle}"
        TargetType="{x:Type Border}" />
    <Style
        x:Key="ItemBulletSelectedStyle"
        BasedOn="{StaticResource BaseBulletStyle}"
        TargetType="{x:Type Border}" />
    <Style x:Key="ImageIconStyle" TargetType="{x:Type Image}">
        <Setter Property="Height" Value="32" />
        <Setter Property="Width" Value="32" />
    </Style>

    <Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="FontSize" Value="28" />
        <Setter Property="Margin" Value="16 7 0 7" />
        <Setter Property="Padding" Value="0 0 68 0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Height" Value="48" />
        <Setter Property="Foreground" Value="#E3E0E3" />
        <Setter Property="CaretBrush" Value="#E3E0E3" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBox}">
                    <Border
                        x:Name="border"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="True">
                        <ui:ScrollViewerEx
                            x:Name="PART_ContentHost"
                            Background="{TemplateBinding Background}"
                            Focusable="false"
                            HorizontalScrollBarVisibility="Hidden"
                            VerticalScrollBarVisibility="Hidden">
                            <ui:ScrollViewerEx.ContentTemplate>
                                <DataTemplate>
                                    <Grid Background="{Binding Background, ElementName=PART_ContentHost}">
                                        <ContentPresenter Content="{Binding Path=Content, ElementName=PART_ContentHost}" />
                                    </Grid>
                                </DataTemplate>
                            </ui:ScrollViewerEx.ContentTemplate>
                        </ui:ScrollViewerEx>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--  Further font customisations are dynamically loaded in Theme.cs  -->
    <Style x:Key="BaseQueryBoxBgStyle" TargetType="{x:Type Border}">
        <Setter Property="Margin" Value="0 0 0 0" />
    </Style>
    <Style
        x:Key="QueryBoxBgStyle"
        BasedOn="{StaticResource BaseQueryBoxBgStyle}"
        TargetType="{x:Type Border}" />
    <Style
        x:Key="BaseQuerySuggestionBoxStyle"
        BasedOn="{StaticResource BaseQueryBoxStyle}"
        TargetType="{x:Type TextBox}">
        <Setter Property="Foreground" Value="DarkGray" />
        <Setter Property="Height" Value="48" />
        <Setter Property="Margin" Value="16 7 0 7" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="0 0 68 0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
    </Style>

    <Style x:Key="BaseWindowBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="#2F2F2F" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="CornerRadius" Value="5" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
    </Style>
    <Style x:Key="BaseWindowStyle" TargetType="{x:Type Window}">
        <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
        <Setter Property="Width" Value="600" />
    </Style>

    <Style x:Key="WindowRadius" TargetType="{x:Type Border}">
        <Setter Property="CornerRadius" Value="5" />
    </Style>

    <Style x:Key="BasePendingLineStyle" TargetType="{x:Type Line}">
        <Setter Property="Stroke" Value="{StaticResource SystemAccentColorLight1Brush}" />
    </Style>
    <Style
        x:Key="PendingLineStyle"
        BasedOn="{StaticResource BasePendingLineStyle}"
        TargetType="{x:Type Line}" />

    <Style x:Key="BaseClockPanelPosition" TargetType="{x:Type Canvas}" />

    <Style x:Key="BaseClockPanel" TargetType="{x:Type StackPanel}">
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Margin" Value="0 0 66 0" />
        <Setter Property="Visibility" Value="Collapsed" />
    </Style>
    <Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="20" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Foreground" Value="#8f8f8f" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="0 0 0 3" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding ElementName=DateBox, Path=Visibility}" Value="Visible">
                <Setter Property="FontSize" Value="14" />
                <Setter Property="Margin" Value="0 0 0 0" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="BaseDateBox" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="18" />
        <Setter Property="Foreground" Value="#8f8f8f" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="0 0 0 0" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding ElementName=ClockBox, Path=Visibility}" Value="Visible">
                <Setter Property="FontSize" Value="14" />
                <Setter Property="Margin" Value="0 0 0 3" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style
        x:Key="ClockBox"
        BasedOn="{StaticResource BaseClockBox}"
        TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#C6C6C6" />
    </Style>
    <Style
        x:Key="DateBox"
        BasedOn="{StaticResource BaseDateBox}"
        TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#C6C6C6" />
    </Style>
    <Style
        x:Key="ClockPanel"
        BasedOn="{StaticResource BaseClockPanel}"
        TargetType="{x:Type StackPanel}">
        <Setter Property="Orientation" Value="Vertical" />
    </Style>

    <!--  Item Style  -->
    <Style x:Key="ProgressBarResult" TargetType="{x:Type ProgressBar}">
        <Setter Property="Height" Value="18" />
        <Setter Property="Margin" Value="0 0 0 4" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Maximum" Value="100" />
        <Setter Property="Minimum" Value="0" />
        <Setter Property="Visibility" Value="Visible" />
        <Setter Property="Foreground" Value="#26a0da " />
    </Style>

    <Style x:Key="BaseItemTitleStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#FFFFF8" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="Margin" Value="0 0 0 1" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
    </Style>
    <Style x:Key="BaseItemSubTitleStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#D9D9D4" />
        <Setter Property="Margin" Value="0 1 0 0" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="FontSize" Value="13" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding ElementName=SubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
                <Setter Property="Height" Value="0" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="BaseItemNumberStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Margin" Value="3 0 0 0" />
        <Setter Property="FontSize" Value="22" />
    </Style>
    <Style x:Key="BaseGlyphStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#ffffff" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Width" Value="25" />
        <Setter Property="Height" Value="25" />
        <Setter Property="FontSize" Value="25" />
    </Style>
    <Style x:Key="BaseGlyphSelectedStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#ffffff" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Width" Value="25" />
        <Setter Property="Height" Value="25" />
        <Setter Property="FontSize" Value="25" />
    </Style>
    <Style x:Key="BaseItemTitleSelectedStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#FFFFF8" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="Margin" Value="0 0 0 1" />
        <Setter Property="VerticalAlignment" Value="Bottom" />
    </Style>
    <Style x:Key="BaseItemSubTitleSelectedStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#D9D9D4" />
        <Setter Property="FontSize" Value="13" />
        <Setter Property="Margin" Value="0 1 0 0" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding ElementName=SubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
                <Setter Property="Height" Value="0" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="BaseItemImageSelectedStyle" TargetType="{x:Type Image}" />

    <Style x:Key="BaseListboxStyle" TargetType="{x:Type ListBox}">
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="Margin" Value="{DynamicResource ResultMargin}" />
        <Setter Property="Padding" Value="0 0 0 0" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <cc:CustomScrollViewerEx
                        x:Name="ListBoxScrollViewer"
                        Focusable="False"
                        Template="{DynamicResource ScrollViewerControlTemplate}">
                        <cc:CustomScrollViewerEx.Style>
                            <Style TargetType="cc:CustomScrollViewerEx">
                                <Style.Triggers>
                                    <Trigger Property="ComputedVerticalScrollBarVisibility" Value="Visible">
                                        <Setter Property="Margin" Value="0 0 0 0" />
                                        <Setter Property="Padding" Value="0 0 0 0" />
                                    </Trigger>
                                    <Trigger Property="ComputedVerticalScrollBarVisibility" Value="Collapsed">
                                        <Setter Property="Margin" Value="0 0 0 0" />
                                        <Setter Property="Padding" Value="0 0 0 0" />
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </cc:CustomScrollViewerEx.Style>
                        <VirtualizingStackPanel IsItemsHost="True" />
                    </cc:CustomScrollViewerEx>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Items.Count}" Value="0">
                <Setter Property="Margin" Value="0" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <!--  ScrollViewer Style  -->
    <ControlTemplate x:Key="ScrollViewerControlTemplate" TargetType="{x:Type ScrollViewer}">
        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <!--  content in the left of ScrollViewer, just default  -->
            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                Grid.Row="0"
                Grid.Column="0"
                Margin="0"
                CanContentScroll="{TemplateBinding CanContentScroll}"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"
                Content="{TemplateBinding Content}"
                ContentTemplate="{TemplateBinding ContentTemplate}" />

            <!--  Scrollbar in the right of ScrollViewer  -->
            <ScrollBar
                x:Name="PART_VerticalScrollBar"
                Grid.Row="0"
                Grid.Column="0"
                Margin="0 0 0 0"
                HorizontalAlignment="Right"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Cursor="Arrow"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Style="{DynamicResource ScrollBarStyle}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" />
        </Grid>
    </ControlTemplate>

    <!--  button style in the middle of the scrollbar  -->
    <Style x:Key="BaseThumbStyle" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="true" />
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="Focusable" Value="false" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border
                        Background="#898989"
                        BorderBrush="Transparent"
                        CornerRadius="2"
                        DockPanel.Dock="Right" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="BaseScrollBarStyle" TargetType="{x:Type ScrollBar}">
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
        <Setter Property="Stylus.IsFlicksEnabled" Value="false" />
        <Setter Property="Background" Value="Black" />
        <!--  must set min width  -->
        <Setter Property="MinWidth" Value="0" />
        <Setter Property="Width" Value="5" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <DockPanel>
                        <Track
                            x:Name="PART_Track"
                            DockPanel.Dock="Right"
                            IsDirectionReversed="true">
                            <Track.Thumb>
                                <Thumb Style="{DynamicResource ThumbStyle}" />
                            </Track.Thumb>
                        </Track>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="BaseSeparatorStyle" TargetType="Rectangle" />
    <Style x:Key="HighlightStyle">
        <Setter Property="Inline.FontWeight" Value="Bold" />
    </Style>
    <Style x:Key="BaseItemHotkeyStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Foreground" Value="#8f8f8f" />
    </Style>
    <Style x:Key="BaseItemHotkeySelectedStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Foreground" Value="#8f8f8f" />
    </Style>
    <Style x:Key="BaseItemHotkeyBGStyle" TargetType="{x:Type Border}">
        <Setter Property="Margin" Value="12 0 12 0" />
        <Setter Property="Padding" Value="6 4 6 4" />
        <Setter Property="Background" Value="#138A8A8A" />
        <Setter Property="CornerRadius" Value="4" />
    </Style>
    <Style x:Key="BaseItemHotkeyBGSelectedStyle" TargetType="{x:Type Border}">
        <Setter Property="Margin" Value="12 0 12 0" />
        <Setter Property="Padding" Value="6 4 6 4" />
        <Setter Property="CornerRadius" Value="4" />
        <Setter Property="Background" Value="#138A8A8A" />
    </Style>
    <Style
        x:Key="ItemHotkeyBGStyle"
        BasedOn="{StaticResource BaseItemHotkeyBGStyle}"
        TargetType="{x:Type Border}">
        <Setter Property="Margin" Value="12 0 12 0" />
        <Setter Property="Padding" Value="6 4 6 4" />
        <Setter Property="CornerRadius" Value="4" />
    </Style>
    <Style
        x:Key="ItemHotkeyBGSelectedStyle"
        BasedOn="{StaticResource BaseItemHotkeyBGSelectedStyle}"
        TargetType="{x:Type Border}" />

    <!--  DO NOT USE THIS KEY. this key for themes with wrong typo. This key should be removed. Right key is BaseItemHotkeySelectedStyle.  -->
    <Style x:Key="BaseItemHotkeySelecetedStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontSize" Value="12" />
        <Setter Property="Foreground" Value="#8f8f8f" />
    </Style>


    <Geometry x:Key="SearchIconImg">F1 M12000,12000z M0,0z M10354,10962C10326,10951 10279,10927 10249,10907 10216,10886 9476,10153 8370,9046 7366,8042 6541,7220 6536,7220 6532,7220 6498,7242 6461,7268 6213,7447 5883,7619 5592,7721 5194,7860 4802,7919 4360,7906 3612,7886 2953,7647 2340,7174 2131,7013 1832,6699 1664,6465 1394,6088 1188,5618 1097,5170 1044,4909 1030,4764 1030,4470 1030,4130 1056,3914 1135,3609 1263,3110 1511,2633 1850,2235 1936,2134 2162,1911 2260,1829 2781,1395 3422,1120 4090,1045 4271,1025 4667,1025 4848,1045 5505,1120 6100,1368 6630,1789 6774,1903 7081,2215 7186,2355 7362,2588 7467,2759 7579,2990 7802,3455 7911,3937 7911,4460 7911,4854 7861,5165 7737,5542 7684,5702 7675,5724 7602,5885 7517,6071 7390,6292 7270,6460 7242,6499 7220,6533 7220,6538 7220,6542 8046,7371 9055,8380 10441,9766 10898,10229 10924,10274 10945,10308 10966,10364 10976,10408 10990,10472 10991,10493 10980,10554 10952,10717 10840,10865 10690,10937 10621,10971 10607,10974 10510,10977 10425,10980 10395,10977 10354,10962z M4685,7050C5214,7001 5694,6809 6100,6484 6209,6396 6396,6209 6484,6100 7151,5267 7246,4110 6721,3190 6369,2571 5798,2137 5100,1956 4706,1855 4222,1855 3830,1957 3448,2056 3140,2210 2838,2453 2337,2855 2010,3427 1908,4080 1877,4274 1877,4656 1908,4850 1948,5105 2028,5370 2133,5590 2459,6272 3077,6782 3810,6973 3967,7014 4085,7034 4290,7053 4371,7061 4583,7059 4685,7050z</Geometry>

    <Style x:Key="BaseSearchIconStyle" TargetType="{x:Type Path}">
        <Setter Property="Fill" Value="#555555" />
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
    </Style>
    <Style x:Key="BaseSearchIconPosition" TargetType="{x:Type Canvas}">
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
        <Setter Property="Margin" Value="0 0 18 0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Right" />
    </Style>
    <Style x:Key="BasePreviewBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="1 0 0 0" />
        <Setter Property="Width" Value="5" />
        <Setter Property="BorderBrush" Value="#FFEAEAEA" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Margin" Value="0 0 10 10" />
        <Setter Property="Background" Value="Transparent" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
                    <Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.Setters>
                    <Setter Property="Height" Value="0" />
                    <Setter Property="Margin" Value="0" />
                </MultiDataTrigger.Setters>
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="BasePreviewGlyph" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#555555" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="FontSize" Value="90" />
        <Setter Property="MaxWidth" Value="96" />
        <Setter Property="Height" Value="Auto" />
        <Setter Property="MaxHeight" Value="96" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding ElementName=PreviewGlyphIcon, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ImageAreaWidth" TargetType="{x:Type ColumnDefinition}">
        <Setter Property="Width" Value="60" />
    </Style>
    <Style
        x:Key="PreviewGlyph"
        BasedOn="{StaticResource BasePreviewGlyph}"
        TargetType="{x:Type TextBlock}" />
    <Style x:Key="PreviewSep" TargetType="{x:Type Separator}">
        <Setter Property="Visibility" Value="Visible" />
        <Setter Property="Background" Value="{Binding ElementName=MiddleSeparator, Path=Fill}" />
        <Setter Property="Margin" Value="0 15 5 5" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding ElementName=PreviewSubTitle, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
                <Setter Property="Visibility" Value="Collapsed" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style
        x:Key="PreviewBorderStyle"
        BasedOn="{StaticResource BasePreviewBorderStyle}"
        TargetType="{x:Type Border}">
        <Setter Property="BorderBrush" Value="Gray" />
    </Style>

    <Style x:Key="PreviewArea" TargetType="{x:Type Grid}">
        <Setter Property="Visibility" Value="Collapsed" />
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <!--
                    <Condition Binding="{Binding ElementName=ResultListBox, Path=Visibility}" Value="Collapsed" />
                    <Condition Binding="{Binding ElementName=ResultContextMenu, Path=Visibility}" Value="Collapsed" />-->
                    <Condition Binding="{Binding ElementName=History, Path=Visibility}" Value="Collapsed" />
                    <Condition Binding="{Binding ElementName=ResultListBox, Path=Items.Count}" Value="0" />
                </MultiDataTrigger.Conditions>
                <MultiDataTrigger.Setters>
                    <Setter Property="Height" Value="0" />
                </MultiDataTrigger.Setters>
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>
    <!--  for classic themes  -->

    <Style x:Key="PluginActivationIcon" TargetType="{x:Type Image}">
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
        <Setter Property="Margin" Value="0 0 18 0" />
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
        <Setter Property="Fill" Value="#555555" />
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
    </Style>
    <Style x:Key="SearchIconPosition" TargetType="{x:Type Canvas}">
        <Setter Property="Width" Value="32" />
        <Setter Property="Height" Value="32" />
        <Setter Property="Margin" Value="0 0 18 0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Right" />
    </Style>
    <Style
        x:Key="ClockPanelPosition"
        BasedOn="{StaticResource BaseClockPanelPosition}"
        TargetType="{x:Type Canvas}">
        <Setter Property="Margin" Value="0 0 66 0" />
    </Style>
    <Style
        x:Key="ItemHotkeyStyle"
        BasedOn="{StaticResource BaseItemHotkeyStyle}"
        TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#8f8f8f" />
        <Setter Property="Opacity" Value="0.5" />
    </Style>
    <Style
        x:Key="ItemHotkeySelectedStyle"
        BasedOn="{StaticResource BaseItemHotkeySelectedStyle}"
        TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#8f8f8f" />
        <Setter Property="Opacity" Value="0.5" />
    </Style>
    <Style
        x:Key="ItemGlyphSelectedStyle"
        BasedOn="{StaticResource BaseGlyphSelectedStyle}"
        TargetType="{x:Type TextBlock}">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Width" Value="25" />
        <Setter Property="Height" Value="25" />
        <Setter Property="FontSize" Value="25" />
    </Style>


    <Style x:Key="BasePreviewItemTitleStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#8f8f8f" />
        <Setter Property="FontSize" Value="15" />
        <Setter Property="Margin" Value="0 6 0 0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="TextAlignment" Value="Center" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>
    <Style x:Key="BasePreviewItemSubTitleStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#8f8f8f" />
        <Setter Property="FontSize" Value="12" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="Margin" Value="5 6 0 10" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="LineHeight" Value="18" />
        <Setter Property="TextAlignment" Value="Left" />
        <Setter Property="TextWrapping" Value="Wrap" />
    </Style>

    <Style x:Key="PreviewWindowBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="Background" Value="#2F2F2F" />
        <Setter Property="Padding" Value="0 0 0 0" />
        <Setter Property="CornerRadius" Value="5" />
        <Setter Property="UseLayoutRounding" Value="True" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
    </Style>
    <!--  Style for old version themes  -->
    <Style
        x:Key="PreviewItemTitleStyle"
        BasedOn="{StaticResource BasePreviewItemTitleStyle}"
        TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#8f8f8f" />
    </Style>
    <Style
        x:Key="PreviewItemSubTitleStyle"
        BasedOn="{StaticResource BasePreviewItemSubTitleStyle}"
        TargetType="{x:Type TextBlock}">
        <Setter Property="Foreground" Value="#8f8f8f" />
    </Style>
</ResourceDictionary>
